﻿using System;
using System.Xml.Serialization;
using EpiNEXT.Services.Fields;

namespace EpiNEXT.Services.Validation.Actions
{
    //[Serializable()]
    public sealed class Action_Enable : ActionBase
    {
        public override void Execute(Record record)
        {
            DataEntryInstrument form = record.Form;

            foreach (string fieldName in this.TargetNames)
            {
                IField field = form.Fields[fieldName];
                field.IsCurrentlyEnabled = true;
            }
        }
    }
}
